/**
 * pharma-manager - 13 mars 2011
 * guillaume
 */
package org.bspv.pharma.manager.impl;

import org.bspv.pharma.dao.OrderDeliveryDAO;
import org.bspv.pharma.manager.OrderDeliveryManager;
import org.bspv.pharma.model.Order;
import org.bspv.pharma.model.OrderDelivery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author guillaume
 *
 */
@Service(value = "orderDeliveryManager")
public class OrderDeliveryManagerImpl extends AbstractManagerImpl<OrderDelivery, Long> implements OrderDeliveryManager {

    /**
     * Constructeur par défaut.
     * @param dao DAO
     */
    @Autowired
    public OrderDeliveryManagerImpl(OrderDeliveryDAO dao) {
        super(dao);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public OrderDelivery findByOrder(Order order) {
        return dao.findUniqueResultBy("order", order);
    }
    
}
